package org.cardoso.coyote.application;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.stereotype.Component;

@Component
@ComponentScan
public class SpringContext {

	@SuppressWarnings({ "resource", "unchecked", "rawtypes" })
	public static <T> T getBean(Class className) {
		return (T) new AnnotationConfigApplicationContext(SpringContext.class).getBean(className);
	}
	
}
